﻿@{
    Layout = null;
    string docClsName = ViewData["docClsName"] == null ? "最新信息" : ViewData["docClsName"].ToString();
    string docClsCd = ViewData["docClsCd"] == null ? "" : ViewData["docClsCd"].ToString();
}
@using ElingOA6_DSJCJ.Models;
@using Webdiyer.WebControls.Mvc
@model Dictionary<string, List<ElingOA6_DSJCJ.Models.DocumentGridModel>>
@{
    Dictionary<string, string> dicDocClsNameList = ViewData["dicDocClsNameList"] == null ? new Dictionary<string, string>() : ViewData["dicDocClsNameList"] as Dictionary<string, string>;
   
}
@helper  GetConfigShowText(string keyName, Dictionary<string, string> dicDocClsNameList)
    {
        if (dicDocClsNameList.ContainsKey(keyName))
        {
    @:@dicDocClsNameList[keyName]
       }
}
@helper  GetList(string keyName, Dictionary<string, List<ElingOA6_DSJCJ.Models.DocumentGridModel>> dicDocumentList, Dictionary<string, string> dicDocClsNameList, string width)
    {
        if (dicDocumentList.ContainsKey(keyName))
        {
    <div class="ztzl-div" style="width:@width; height: 295px;">
        <div class="ztzl-title">
            <span><a href="/Column/Shibada_List?clsCd=@keyName" target="_blank">更多</a></span><h3>@GetConfigShowText(keyName, dicDocClsNameList)</h3>
        </div>
        <div class="ztzl-con">
            @{List<ElingOA6_DSJCJ.Models.DocumentGridModel> documentList = new List<DocumentGridModel>();
              if (dicDocumentList.ContainsKey(keyName))
              {
                  documentList = dicDocumentList[keyName];
              }
              foreach (DocumentGridModel documentModel in documentList)
              {
                <li><span>@documentModel.FPubDate.ToString("yyyy-MM-dd")</span><a href="/Column/Shibada_Detail?docId=@documentModel.FDocId" target="_blank" title="@documentModel.FTitle">@documentModel.FTitle</a></li>
              }
            }
        </div>
    </div>
        }
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ElingOA6_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
    <link href="@Url.Content("~/Content/ztzl_css.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
</head>
<body>
    <div class="ztzl-main">
        <div class="ztzl-header">
            <img src="@ViewData["logUrl"].ToString()" width="1000" height="226"/></div>
        @{
            if (dicDocClsNameList.Count > 0)
            {
            <div class="ztzl-nav">
                <a href="/Column/Shibada?clsCd=@docClsCd">首页</a>
                @foreach (KeyValuePair<string, string> dicDocClsNameModel in dicDocClsNameList)
                {
                    <a href="/Column/Shibada_List?clsCd=@dicDocClsNameModel.Key">@dicDocClsNameModel.Value</a>
                }
            </div>
            }
        }
        <div class="ztzl-maincon">
            @{
                List<string> dicDocumentKeyList = new List<string>(Model.Keys);

                int clsCount = dicDocumentKeyList.Count;
                for (int i = 0; i < dicDocumentKeyList.Count; i = i + 2)
                {
                    if (clsCount - i == 1)
                    {
                      @*一行*@
                @GetList(dicDocumentKeyList[i], Model, dicDocClsNameList, "978px");
                    }
                    else if (clsCount - i == 3)
                    {
                     @*3行*@
                @GetList(dicDocumentKeyList[i], Model, dicDocClsNameList, "318px");
                @GetList(dicDocumentKeyList[i + 1], Model, dicDocClsNameList, "318px");
                @GetList(dicDocumentKeyList[i + 2], Model, dicDocClsNameList, "318px");
                                                                                      break;
                    }
                    else
                    { 
                        @*二行*@
                @GetList(dicDocumentKeyList[i], Model, dicDocClsNameList, "483px");
                @GetList(dicDocumentKeyList[i + 1], Model, dicDocClsNameList, "483px");
                    }
                }   
            }
        </div>
        <div class="ztzl-bottom">@Html.Raw(ViewData["CopyRight"].ToString())</div>
    </div>
</body>
</html> 